package com.hdu.joinInMemory.entity.VO;

import com.hdu.joinInMemory.entity.DO.User;
import lombok.Value;


@Value
public class UserVO {
    private Long id;
    private String name;

    public static UserVO apply(User user){
        if (user == null){
            return null;
        }

        return new UserVO(user.getId(), user.getName());
    }
}
